package com.summer.framework.common.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.summer.framework.common.entity.response.BooleanResponse;
import com.summer.framework.common.entity.response.ListResponse;
import com.summer.framework.common.entity.response.ObjectResponse;
import com.summer.framework.common.service.BaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @auther: 杨杰
 * @date: 2018/11/12 18:07
 * @description:
 */
@Slf4j
@RestController
public abstract class BaseRpcController<S extends BaseService<T>, T> {

    @Autowired
    protected S baseService;

    @GetMapping("")
    protected List<T> getAll() {
        return baseService.list(new QueryWrapper<T>());
    }


}

